Optimal. Leaf size=109 \[ \frac {(C (1+n)+A (2+n)) \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d n (2+n) \sqrt {\sin ^2(c+d x)}}+\frac {C (b \sec (c+d x))^{1+n} \tan (c+d x)}{b d (2+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {16, 4131, 3857,
2722} \begin {gather*} \frac {(A (n+2)+C (n+1)) \sin (c+d x) (b \sec (c+d x))^n \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(c+d x)\right )}{d n (n+2) \sqrt {\sin ^2(c+d x)}}+\frac {C \tan (c+d x) (b \sec (c+d x))^{n+1}}{b d (n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 2722
Rule 3857
Rule 4131
Rubi steps
\begin {align*} \int \sec (c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {\int (b \sec (c+d x))^{1+n} \left (A+C \sec ^2(c+d x)\right ) \, dx}{b}\\ &=\frac {C (b \sec (c+d x))^{1+n} \tan (c+d x)}{b d (2+n)}+\frac {\left (A+\frac {C (1+n)}{2+n}\right ) \int (b \sec (c+d x))^{1+n} \, dx}{b}\\ &=\frac {C (b \sec (c+d x))^{1+n} \tan (c+d x)}{b d (2+n)}+\frac {\left (\left (A+\frac {C (1+n)}{2+n}\right ) \left (\frac {\cos (c+d x)}{b}\right )^n (b \sec (c+d x))^n\right ) \int \left (\frac {\cos (c+d x)}{b}\right )^{-1-n} \, dx}{b}\\ &=\frac {\left (A+\frac {C (1+n)}{2+n}\right ) \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d n \sqrt {\sin ^2(c+d x)}}+\frac {C (b \sec (c+d x))^{1+n} \tan (c+d x)}{b d (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.06, size = 215, normalized size = 1.97 \begin {gather*} -\frac {i 2^{2+n} e^{-i (c+d x)} \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{2+n} \left (4 C e^{2 i (c+d x)} (1+n) \, _2F_1\left (1,\frac {1}{2} (-1-n);\frac {5+n}{2};-e^{2 i (c+d x)}\right )+A \left (1+e^{2 i (c+d x)}\right )^2 (3+n) \, _2F_1\left (1,\frac {1-n}{2};\frac {3+n}{2};-e^{2 i (c+d x)}\right )\right ) \sec ^{-2-n}(c+d x) (b \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right )}{d (1+n) (3+n) (A+2 C+A \cos (2 (c+d x)))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.25, size = 0, normalized size = 0.00 \[\int \sec \left (d x +c \right ) \left (b \sec \left (d x +c \right )\right )^{n} \left (A +C \left (\sec ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n}{\cos \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________